package com.tengju.bff.interfaces.covercharge.constant;

public enum IsViewEnum {
    FIRST("FIRST","是"),

    NOT_FIRTST("NOT_FIRTST","否")
    ;


    private IsViewEnum(String code,String desc){
        this.code=code;
        this.desc=desc;
    }

    private String code;
    private String desc;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return desc;
    }

    public void setDescription(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return this.desc;
    }

    public String toString(){ return this.code; }

    public static IsViewEnum getStatusDesc (String code){
        for(IsViewEnum thisEnum : (IsViewEnum.values())){
            if(thisEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return thisEnum;
            }
        }
        return null;
    }
}
